<template>
  <div>
    <el-popconfirm
      confirm-button-text="确认"
      cancel-button-text="取消"
      icon="el-icon-info"
      icon-color="red"
      title="申请批改后将无法再修改"
      @confirm="confirmApply"
      @cancle="cancleApply"
    >
      <div slot="reference">申请批改</div>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  props: ['tmNum','list'],
  data () {
    return {

    }
  },
  created () {

  },
  methods: {
    // 申请批改
    applyCheck () {

    },
    // 申请批改作业
    confirmApply () {
      console.log('confirm',this.tmNum,this.list[this.tmNum-1].id);
      //   this.subNum++
      //   console.log(this.subNum);
      //   this.tmNum++
      //   console.log(this.list[this.tmNum - 2]);
      //   sendPost(api.submitWorkDetail, {
      //     id: this.list[this.tmNum - 2].id,
      //     answer: this.answer
      //   })
    },
    cancleApply () {
      console.log('cancle');
    },
  },
}

</script>
<style lang="less" scoped>
</style>